//
//  LBValidateError.h
//  QuickDialog
//
//  Created by xu on 14-9-23.
//
//

#import <Foundation/Foundation.h>

@interface LBValidateError : NSObject

-(instancetype)initWithSource:(NSString*)source errorMessage:(NSString*)errorMessage;
-(instancetype)initWithErrorMessage:(NSString*)errorMessage;


@property (nonatomic,retain) NSString* source;
@property (nonatomic, retain) NSString *errorMessage;


@end


@interface LBValidateErrors : NSObject

-(instancetype)initWithError:(LBValidateError*)error;
-(instancetype)initWithErrors:(LBValidateErrors*)errors;
-(instancetype)initWithErrorMessage:(NSString*)errorMessage;
-(instancetype)initWithSource:(NSString*)source errorMessage:(NSString*)errorMessage;


@property (nonatomic,retain) NSMutableArray* errors;
@property (readonly, copy) NSString *errorDescription;

-(void)addError:(LBValidateError*)error;
-(void)addErrors:(LBValidateErrors*)errors;

-(BOOL)hasErrors;

@end
